package com.whfc.mach.enums;

/**
 * 数据字典
 *
 * @author guodong_sun
 */
public enum MachDict {

    MAINTAIN_ITEM("maintain_item", "保养项目"),

    MAINTAIN_PAY("maintain_pay", "保养费用");

    private String code;

    private String name;

    MachDict(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }


    public static MachDict parseCode(String code) {
        MachDict[] machDicts = MachDict.values();
        for (MachDict machDict : machDicts) {
            if (machDict.equals(code)) {
                return machDict;
            }
        }
        return null;
    }
}
